package com.diandian.backend.store.dto;

import com.diandian.base.boot.starter.exception.DefaultException;

import java.io.Serializable;

public class ElemeRetailStoreRemoveParamDTO implements Serializable {

	private Long id;
	private String storeCode;
	private String nodeCode;
	private String belong;
	private String orgId;
	private String orgCode;

	public void check(){
		if(this.belong == null || "".equals(this.belong)){
			throw new DefaultException("归属标识不能为空");
		}
		if(this.id == null && this.storeCode == null && "".equals(this.storeCode)){
			throw new DefaultException("门店id和编码不能都为空");
		}
		if(this.nodeCode == null || "".equals(this.nodeCode)){
			throw new DefaultException("节点编码不能为空");
		}
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getStoreCode() {
		return storeCode;
	}

	public void setStoreCode(String storeCode) {
		this.storeCode = storeCode;
	}

	public String getNodeCode() {
		return nodeCode;
	}

	public void setNodeCode(String nodeCode) {
		this.nodeCode = nodeCode;
	}

	public String getBelong() {
		return belong;
	}

	public void setBelong(String belong) {
		this.belong = belong;
	}

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getOrgCode() {
		return orgCode;
	}

	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
}
